abstract class Traffic {
  // 抽象方法 (当作接口)
  String name;
  startUp();
  brake();

  // 抽象类的普通方法
  repair() {
    print('repair');
  }

  // 静态方法不能被重写
  static countWheels() {
    return print('countWheels');
  }
}

abstract class AssembiedInChina {
  String chinaCode;

  /// 车船税缴纳
  payVehicleAndShipTaxes() {
    print('payVehicleAndShipTaxes');
  }
}

class Car extends Traffic {
  @override
  brake() {
    print('Car brake');
  }

  @override
  startUp() {
    print('Car startUp');
  }

  @override
  repair() {
    print('Car repair');
  }
}

class Airplane extends Traffic {
  final bool military;

  Airplane({this.military});

  @override
  brake() {
    print('Airplane brake');
  }

  @override
  startUp() {
    print('Airplane startUp');
  }
}

class B2 extends Airplane {}

class Bus implements Traffic, AssembiedInChina {
  // 多接口
  Bus(this.name);
  @override
  brake() {
    print('Bus brake');
  }

  @override
  repair() {
    print('Bus repair');
  }

  @override
  startUp() {
    print('Bus startUp');
  }

  @override
  String name;

  @override
  String chinaCode;

  @override
  payVehicleAndShipTaxes() {
    return null;
  }
}

class Dog {
  String name;
  wangwang() {
    this.name = 'Cola';
    print('Dog wangwang, this: $this, name: ${this.name}');
  }
}

class Cat {
  String name;
  miaomiao() {
    print('Cat miaomiao, this: $this');
  }
}

class Robot with Cat, Dog {
  Robot();
}

class ArtificialIntelligence extends Airplane with Cat, Dog implements AssembiedInChina {
  @override
  String chinaCode;

  ArtificialIntelligence();

  @override
  payVehicleAndShipTaxes() {
    return null;
  }
}
